Optimal. Leaf size=87 \[ \frac {a^3 \tan (c+d x)}{d}-\frac {a^3 \cot (c+d x)}{d}+\frac {3 a^2 b \sec (c+d x)}{d}-\frac {3 a^2 b \tanh ^{-1}(\cos (c+d x))}{d}+\frac {3 a b^2 \tan (c+d x)}{d}+\frac {b^3 \sec (c+d x)}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.20, antiderivative size = 87, normalized size of antiderivative = 1.00, number of steps used = 12, number of rules used = 9, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.310, Rules used = {2912, 3767, 8, 2622, 321, 207, 2620, 14, 2606} \[ \frac {3 a^2 b \sec (c+d x)}{d}-\frac {3 a^2 b \tanh ^{-1}(\cos (c+d x))}{d}+\frac {a^3 \tan (c+d x)}{d}-\frac {a^3 \cot (c+d x)}{d}+\frac {3 a b^2 \tan (c+d x)}{d}+\frac {b^3 \sec (c+d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 14
Rule 207
Rule 321
Rule 2606
Rule 2620
Rule 2622
Rule 2912
Rule 3767
Rubi steps
\begin {align*} \int \csc ^2(c+d x) \sec ^2(c+d x) (a+b \sin (c+d x))^3 \, dx &=\int \left (3 a b^2 \sec ^2(c+d x)+3 a^2 b \csc (c+d x) \sec ^2(c+d x)+a^3 \csc ^2(c+d x) \sec ^2(c+d x)+b^3 \sec (c+d x) \tan (c+d x)\right ) \, dx\\ &=a^3 \int \csc ^2(c+d x) \sec ^2(c+d x) \, dx+\left (3 a^2 b\right ) \int \csc (c+d x) \sec ^2(c+d x) \, dx+\left (3 a b^2\right ) \int \sec ^2(c+d x) \, dx+b^3 \int \sec (c+d x) \tan (c+d x) \, dx\\ &=\frac {a^3 \operatorname {Subst}\left (\int \frac {1+x^2}{x^2} \, dx,x,\tan (c+d x)\right )}{d}+\frac {\left (3 a^2 b\right ) \operatorname {Subst}\left (\int \frac {x^2}{-1+x^2} \, dx,x,\sec (c+d x)\right )}{d}-\frac {\left (3 a b^2\right ) \operatorname {Subst}(\int 1 \, dx,x,-\tan (c+d x))}{d}+\frac {b^3 \operatorname {Subst}(\int 1 \, dx,x,\sec (c+d x))}{d}\\ &=\frac {3 a^2 b \sec (c+d x)}{d}+\frac {b^3 \sec (c+d x)}{d}+\frac {3 a b^2 \tan (c+d x)}{d}+\frac {a^3 \operatorname {Subst}\left (\int \left (1+\frac {1}{x^2}\right ) \, dx,x,\tan (c+d x)\right )}{d}+\frac {\left (3 a^2 b\right ) \operatorname {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\sec (c+d x)\right )}{d}\\ &=-\frac {3 a^2 b \tanh ^{-1}(\cos (c+d x))}{d}-\frac {a^3 \cot (c+d x)}{d}+\frac {3 a^2 b \sec (c+d x)}{d}+\frac {b^3 \sec (c+d x)}{d}+\frac {a^3 \tan (c+d x)}{d}+\frac {3 a b^2 \tan (c+d x)}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.40, size = 114, normalized size = 1.31 \[ -\frac {\csc \left (\frac {1}{2} (c+d x)\right ) \sec \left (\frac {1}{2} (c+d x)\right ) \sec (c+d x) \left (\left (2 a^3+3 a b^2\right ) \cos (2 (c+d x))-2 b \left (3 a^2+b^2\right ) \sin (c+d x)-3 a b \left (a \sin (2 (c+d x)) \left (\log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )-\log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )\right )+b\right )\right )}{4 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.43, size = 131, normalized size = 1.51 \[ -\frac {3 \, a^{2} b \cos \left (d x + c\right ) \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) - 3 \, a^{2} b \cos \left (d x + c\right ) \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) - 2 \, a^{3} - 6 \, a b^{2} + 2 \, {\left (2 \, a^{3} + 3 \, a b^{2}\right )} \cos \left (d x + c\right )^{2} - 2 \, {\left (3 \, a^{2} b + b^{3}\right )} \sin \left (d x + c\right )}{2 \, d \cos \left (d x + c\right ) \sin \left (d x + c\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.22, size = 148, normalized size = 1.70 \[ \frac {6 \, a^{2} b \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) + a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \frac {2 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 5 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 12 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 10 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 4 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - a^{3}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.65, size = 111, normalized size = 1.28 \[ \frac {a^{3}}{d \sin \left (d x +c \right ) \cos \left (d x +c \right )}-\frac {2 a^{3} \cot \left (d x +c \right )}{d}+\frac {3 a^{2} b}{d \cos \left (d x +c \right )}+\frac {3 a^{2} b \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{d}+\frac {3 a \,b^{2} \tan \left (d x +c \right )}{d}+\frac {b^{3}}{d \cos \left (d x +c \right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.38, size = 90, normalized size = 1.03 \[ \frac {3 \, a^{2} b {\left (\frac {2}{\cos \left (d x + c\right )} - \log \left (\cos \left (d x + c\right ) + 1\right ) + \log \left (\cos \left (d x + c\right ) - 1\right )\right )} - 2 \, a^{3} {\left (\frac {1}{\tan \left (d x + c\right )} - \tan \left (d x + c\right )\right )} + 6 \, a b^{2} \tan \left (d x + c\right ) + \frac {2 \, b^{3}}{\cos \left (d x + c\right )}}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 11.91, size = 120, normalized size = 1.38 \[ \frac {a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,d}+\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (12\,a^2\,b+4\,b^3\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (5\,a^3+12\,a\,b^2\right )-a^3}{d\,\left (2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\right )}+\frac {3\,a^2\,b\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________